<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="/assets/lib/layui/css/layui.css" />
    <link rel="stylesheet" href="/assets/css/article/art_list.css" />
    <link rel="stylesheet" href="/assets/lib/cropper/cropper.css" />
</head>

<body>
    <!-- 卡片区域 -->
    <div class="layui-card">
        <div class="layui-card-header">写文章</div>
        <form id="form1" class="layui-form">
            <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->
            <div class="layui-form-item">
                <label class="layui-form-label">标题文章</label>
                <div class="layui-input-block">
                    <input type="text" name="" placeholder="请输入文章标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">文章类别</label>
                <div class="layui-input-block">
                    <select id="cate_id" name="cate_id" lay-filter="aihao">
                       
                    </select>
                </div>
            </div>
            <!--书写内容部分-->
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">文章内容</label>
                <div class="layui-input-block">
                    <textarea name="content" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>


            <!-- 输入文章部分 -->
            <div class="layui-form-item">
                <!-- 左侧的 label -->
                <label class="layui-form-label">文章封面</label>
                <!-- 选择封面区域 -->
                <div class="layui-input-block cover-box">
                    <!-- 左侧裁剪区域 -->
                    <div class="cover-left">
                        <img id="image" src="/assets/images/sample2.jpg" alt="" />
                    </div>
                    <!-- 右侧预览区域和选择封面区域 -->
                    <div class="cover-right">
                        <!-- 预览的区域 -->
                        <div class="img-preview"></div>
                        <!-- 隐藏的选择1框 -->
                        <input type="file" id="filel" style="display: none;" accept="image/png,image/gif/image/jpg,image/jpeg">
                        <!-- 选择封面按钮 -->
                        <button id="uploadbtn" type="button" class="layui-btn layui-btn-danger">选择封面</button>
                    </div>
                </div>
            </div>

            <!-- 末尾发布部分 -->
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="*">提交</button>
                    <button id="caogaobtn" class="layui-btn layui-btn-primary">草稿</button>
                </div>
            </div>
        </form>
    </div>

    <!-- 导入第三方的 JS 插件 -->
    <script src="/assets/lib/layui/layui.all.js"></script>
    <script src="/assets/lib/jquery.js"></script>
    <script src="/assets/js/baseAPI.js"></script>
    <!-- 富文本 -->
    <script src="/assets/lib/tinymce/tinymce.min.js"></script>
    <script src="/assets/lib/tinymce/tinymce_setup.js"></script>

    <script src="/assets/lib/cropper/Cropper.js"></script>
    <script src="/assets/lib/cropper/jquery-cropper.js"></script>
    <!-- 引入模板引擎 -->
    <script src="/assets/lib/template-web.js"></script>
    <!-- 导入自己的 JS 脚本 -->
    <script src="/assets/js/article/art_list.js"></script>

<script type="text/html" id="cate-tpl">
    <!-- value就是当点击某元素返回的值 -->
    <option value=""></option>
    {{each data}}
    <option value="{{$value.Id}}">{{$value.name}}</option>
    {{/each}}
</script>
</body>

</html>